package com.atguigu.upp.mapper;

import com.atguigu.upp.beans.TagInfo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Smexy on 2023/3/24
 */
public interface TagInfoMapper
{
    //根据TaskId查询对应的tag信息
    @Select("select * from tag_info where tag_task_id = #{id}")
    TagInfo getTagInfoByTaskId(String taskId);

    //查询当前要计算的标签有哪些
    @Select("SELECT * FROM tag_info WHERE `tag_task_id` IN " +
        " (SELECT id FROM task_info WHERE task_status = '1')")
    List<TagInfo> queryTagsNeedToExecute();
}
